package AcWing周赛;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-09-10
 * Time: 19:14
 */
public class Demo68_2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String s = scanner.next();
        int[] q = new int[n];
        for(int i = 0; i < n; i++){
            if(s.charAt(i) == '<'){
                q[i] = 0;
            }else{
                q[i] = 1;
            }
        }
        int res = 0;
        for(int i = 0; i < n; i++){
            if(q[i] == 0){
                res++;
            }else{
                break;
            }
        }
        for(int i = n - 1; i >= 0; i--){
            if(q[i] == 1){
                res++;
            }else{
                break;
            }
        }
        System.out.println(res);
    }
}
